package com.peppa.petshop.config;

/**
 * @author SongTiantian
 * @create 2021-06-15-15:46
 */

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class AppConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //浏览器请求映射到对应页面（ViewName代表对应的html）
        registry.addViewController("/").setViewName("login");
        registry.addViewController("/login").setViewName("login-1");
        registry.addViewController("/index").setViewName("index");
    }

}
